.class Lcom/example/inshopbuy/InShopBuyShopsActivity$3;
.super Ljava/lang/Object;
.source "InShopBuyShopsActivity.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/inshopbuy/InShopBuyShopsActivity;->getHttpShopData(Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/inshopbuy/InShopBuyShopsActivity;

.field private final synthetic val$url:Ljava/lang/String;


# direct methods
.method constructor <init>(Lcom/example/inshopbuy/InShopBuyShopsActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/inshopbuy/InShopBuyShopsActivity$3;->this$0:Lcom/example/inshopbuy/InShopBuyShopsActivity;

    iput-object p2, p0, Lcom/example/inshopbuy/InShopBuyShopsActivity$3;->val$url:Ljava/lang/String;

    .line 244
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 11

    .prologue
    .line 247
    iget-object v9, p0, Lcom/example/inshopbuy/InShopBuyShopsActivity$3;->val$url:Ljava/lang/String;

    iget-object v10, p0, Lcom/example/inshopbuy/InShopBuyShopsActivity$3;->this$0:Lcom/example/inshopbuy/InShopBuyShopsActivity;

    # getter for: Lcom/example/inshopbuy/InShopBuyShopsActivity;->m:Lmyapp/MyApp;
    invoke-static {v10}, Lcom/example/inshopbuy/InShopBuyShopsActivity;->access$6(Lcom/example/inshopbuy/InShopBuyShopsActivity;)Lmyapp/MyApp;

    move-result-object v10

    invoke-static {v9, v10}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v8

    .line 249
    .local v8, "str":Ljava/lang/String;
    :try_start_0
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2, v8}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 250
    .local v2, "jsonObject":Lorg/json/JSONObject;
    const-string v9, "error"

    invoke-virtual {v2, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    const-string v10, "true"

    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_0

    .line 251
    new-instance v3, Landroid/os/Message;

    invoke-direct {v3}, Landroid/os/Message;-><init>()V

    .line 252
    .local v3, "message":Landroid/os/Message;
    const/16 v9, 0xb

    iput v9, v3, Landroid/os/Message;->arg1:I

    .line 253
    const-string v9, "msg"

    invoke-virtual {v2, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    iput-object v9, v3, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 254
    iget-object v9, p0, Lcom/example/inshopbuy/InShopBuyShopsActivity$3;->this$0:Lcom/example/inshopbuy/InShopBuyShopsActivity;

    # getter for: Lcom/example/inshopbuy/InShopBuyShopsActivity;->h:Landroid/os/Handler;
    invoke-static {v9}, Lcom/example/inshopbuy/InShopBuyShopsActivity;->access$7(Lcom/example/inshopbuy/InShopBuyShopsActivity;)Landroid/os/Handler;

    move-result-object v9

    invoke-virtual {v9, v3}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 299
    .end local v2    # "jsonObject":Lorg/json/JSONObject;
    :goto_0
    return-void

    .line 258
    .end local v3    # "message":Landroid/os/Message;
    .restart local v2    # "jsonObject":Lorg/json/JSONObject;
    :cond_0
    const-string v9, "msg"

    invoke-virtual {v2, v9}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v9

    if-eqz v9, :cond_1

    .line 259
    new-instance v3, Landroid/os/Message;

    invoke-direct {v3}, Landroid/os/Message;-><init>()V

    .line 260
    .restart local v3    # "message":Landroid/os/Message;
    const/16 v9, 0x16

    iput v9, v3, Landroid/os/Message;->arg1:I

    .line 261
    iget-object v9, p0, Lcom/example/inshopbuy/InShopBuyShopsActivity$3;->this$0:Lcom/example/inshopbuy/InShopBuyShopsActivity;

    # getter for: Lcom/example/inshopbuy/InShopBuyShopsActivity;->h:Landroid/os/Handler;
    invoke-static {v9}, Lcom/example/inshopbuy/InShopBuyShopsActivity;->access$7(Lcom/example/inshopbuy/InShopBuyShopsActivity;)Landroid/os/Handler;

    move-result-object v9

    invoke-virtual {v9, v3}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 290
    .end local v2    # "jsonObject":Lorg/json/JSONObject;
    .end local v3    # "message":Landroid/os/Message;
    :catch_0
    move-exception v0

    .line 291
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 292
    new-instance v3, Landroid/os/Message;

    invoke-direct {v3}, Landroid/os/Message;-><init>()V

    .line 293
    .restart local v3    # "message":Landroid/os/Message;
    const/4 v9, 0x3

    iput v9, v3, Landroid/os/Message;->arg1:I

    .line 294
    iget-object v9, p0, Lcom/example/inshopbuy/InShopBuyShopsActivity$3;->this$0:Lcom/example/inshopbuy/InShopBuyShopsActivity;

    # getter for: Lcom/example/inshopbuy/InShopBuyShopsActivity;->h:Landroid/os/Handler;
    invoke-static {v9}, Lcom/example/inshopbuy/InShopBuyShopsActivity;->access$7(Lcom/example/inshopbuy/InShopBuyShopsActivity;)Landroid/os/Handler;

    move-result-object v9

    invoke-virtual {v9, v3}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 265
    .end local v0    # "e":Lorg/json/JSONException;
    .end local v3    # "message":Landroid/os/Message;
    .restart local v2    # "jsonObject":Lorg/json/JSONObject;
    :cond_1
    :try_start_1
    const-string v9, "msg"

    invoke-virtual {v2, v9}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v6

    .line 267
    .local v6, "shoplist":Lorg/json/JSONArray;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_1
    invoke-virtual {v6}, Lorg/json/JSONArray;->length()I

    move-result v9

    if-lt v1, v9, :cond_2

    .line 286
    new-instance v3, Landroid/os/Message;

    invoke-direct {v3}, Landroid/os/Message;-><init>()V

    .line 287
    .restart local v3    # "message":Landroid/os/Message;
    const/4 v9, 0x5

    iput v9, v3, Landroid/os/Message;->arg1:I

    .line 288
    iget-object v9, p0, Lcom/example/inshopbuy/InShopBuyShopsActivity$3;->this$0:Lcom/example/inshopbuy/InShopBuyShopsActivity;

    # getter for: Lcom/example/inshopbuy/InShopBuyShopsActivity;->h:Landroid/os/Handler;
    invoke-static {v9}, Lcom/example/inshopbuy/InShopBuyShopsActivity;->access$7(Lcom/example/inshopbuy/InShopBuyShopsActivity;)Landroid/os/Handler;

    move-result-object v9

    invoke-virtual {v9, v3}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 269
    .end local v3    # "message":Landroid/os/Message;
    :cond_2
    new-instance v5, Lcom/example/inshopbuy/InShopBean;

    invoke-direct {v5}, Lcom/example/inshopbuy/InShopBean;-><init>()V

    .line 270
    .local v5, "shopBean":Lcom/example/inshopbuy/InShopBean;
    invoke-virtual {v6, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v4

    .line 271
    .local v4, "object":Lorg/json/JSONObject;
    const-string v9, "id"

    invoke-virtual {v4, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Lcom/example/inshopbuy/InShopBean;->setId(Ljava/lang/String;)V

    .line 272
    const-string v9, "shopname"

    invoke-virtual {v4, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Lcom/example/inshopbuy/InShopBean;->setShopname(Ljava/lang/String;)V

    .line 273
    const-string v9, "shoplogo"

    invoke-virtual {v4, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Lcom/example/inshopbuy/InShopBean;->setShoplogo(Ljava/lang/String;)V

    .line 274
    const-string v9, "shoptype"

    invoke-virtual {v4, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Lcom/example/inshopbuy/InShopBean;->setShoptype(Ljava/lang/String;)V

    .line 275
    const-string v9, "is_open"

    invoke-virtual {v4, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Lcom/example/inshopbuy/InShopBean;->setIs_open(Ljava/lang/String;)V

    .line 276
    const-string v9, "point"

    invoke-virtual {v4, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Lcom/example/inshopbuy/InShopBean;->setPoint(Ljava/lang/String;)V

    .line 277
    const-string v9, "address"

    invoke-virtual {v4, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Lcom/example/inshopbuy/InShopBean;->setAddress(Ljava/lang/String;)V

    .line 278
    const-string v9, "juli"

    invoke-virtual {v4, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Lcom/example/inshopbuy/InShopBean;->setDistance(Ljava/lang/String;)V

    .line 280
    const-string v9, "shopshui"

    invoke-virtual {v4, v9}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v7

    .line 281
    .local v7, "shopshui":Lorg/json/JSONObject;
    const-string v9, "name"

    invoke-virtual {v7, v9}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Lcom/example/inshopbuy/InShopBean;->setName(Ljava/lang/String;)V

    .line 283
    iget-object v9, p0, Lcom/example/inshopbuy/InShopBuyShopsActivity$3;->this$0:Lcom/example/inshopbuy/InShopBuyShopsActivity;

    # getter for: Lcom/example/inshopbuy/InShopBuyShopsActivity;->shopBeans:Ljava/util/List;
    invoke-static {v9}, Lcom/example/inshopbuy/InShopBuyShopsActivity;->access$8(Lcom/example/inshopbuy/InShopBuyShopsActivity;)Ljava/util/List;

    move-result-object v9

    invoke-interface {v9, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 267
    add-int/lit8 v1, v1, 0x1

    goto/16 :goto_1
.end method
